UPLOADit 1.0 for Windows and Macintosh
2004, Comm-Unity Networking Systems - All Rights Reserved.


Information about the FileMaker 7 Preview of UPLOADit


Contents:

- Introduction
- Installing the Plug-in
- Extra Configuration Options
- Changed/Extra Functions
- Installing the Example Solution
- Testing the Example Solution


Introduction:

FileMaker 7 came out after a majority of the UPLOADit documentation
was written, so the documentation does not mention anything about
this FileMaker 7 version. So, therefore the FileMaker 7 version
of UPLOADit is a "Preview" because we do not have any formal
documentation about it. The plug-in itself works well as far as our
testing has proved. The only problems we have seen are a cause of
bugs that appear to be in FileMaker 7 itself. The rest of this
document will explain some of the features in the FileMaker 7
version of UPLOADit as well as how to install and use the included
example database.


Installing the Plug-in

Windows:

To install the plug-in on the Windows platform, first quit FileMaker
7 if it is open. You should find a file in the FM7 Preview directory
named "UPLOADit_WIN.fmx". This is the plug-in file for Windows. Copy
this file to the directory named "Extensions" inside your FileMaker
7 application directory.  This directory is usually on your hard
drive in a directory similar to this:

c:\Program Files\FileMaker\FileMaker Pro\Extensions\

After installation, you can start up FileMaker 7, and the plug-in
should automatically be active. You can then read the "Installing
the Example Solution" and "Using the Example Solution" sections of
this document.

Macintosh:

To install the plug-in on the Macintosh platform, first quit
FileMaker 7 if it is open. You should find a file in the FM7 Preview
folder named "UPLOADit_OSX.fmplugin". This is the plug-in file for
Macintosh. Copy this file into the folder named "Extensions" inside
your FileMaker 7 application folder. This folder is usually on your
hard drive in a folder similar to this:

<Your HD>/Applications/FileMaker Pro 7/Extensions/

After installation, you can start up FileMaker 7, and the plug-in
should automatically be active. You can then read the "Installing
the Example Solution" and "Using the Example Solution" sections of
this document.


Extra Configuration Options:

The Plug-in Architecture in FileMaker 7 has changed in several ways
from FileMaker 6 and other previous versions. In those previous
versions of FileMaker, all plug-in functions were called through the
"External()" function where the first parameter of that function was
the plug-in function name, and the second parameter of that function
was the actual parameter you were trying to send to the plug-in
function.  So, if the plug-in had a function named "Upld-Port" that
allowed you to set the TCP/IP port for the plug-in, it would look
something like this:

External("Upld-Port", "8080")

This tells the FileMaker Calculation Engine to call the "Upld-Port"
function with the single parameter "8080". In FileMaker 7, this has
now changed and plug-ins can have functions that look more like
other calculation functions, as well as take multiple parameters.
So, in FileMaker 7, this function would probably look like this:

Upld_Port("8080")

So, a plug-in can now have calculation functions which look and work
better, but at the same time, this could cause a problem for older
FileMaker solutions that are being converted to the new FileMaker 7
format. Everywhere in your scripts where you called plug-in
functions will now need to be changed to the new formats. While in
the end this will work out to your advantage because the plug-in
functions can do a lot more now, it does not make it particularly
easy to simply convert a solution and expect it to work the way it
did in previous versions of FileMaker.

So, the FileMaker 7 version of UPLOADit has an option that you can
define on the "Advanced" tab of the UPLOADit Configuration Dialog.
This checkbox labeled "Use Old Style Functions" will make UPLOADit
define its External Functions using the old "External()" style calls
in FileMaker instead of the newer function calls. This means that
if you have the option turned on, you should be able to convert a
database from FileMaker 6 (or before) to the FileMaker 7 format and
use it as is, without any modification to your scripts.
Unfortunately, this also means that you will not be able to use some
of the new functions available in the FileMaker 7 version of the
plug-in. Whenever you switch this option on or off, you will need to
either uncheck and recheck the plug-in in FileMaker's Application
Preferences dialog, or close and restart FileMaker for the change to
take effect.


Changed/Extra Functions:

When you are using the New Style Functions in the plug-in, some of
them are missing or changed, and some functions are entirely new.
(If you do not know what we mean by "New Style Functions", see the
"Extra Configuration Options" section above.) Here are the changes:

- "Upld_Port"
    - This function does not exist in the FileMaker 7 version of the
      plug-in. Instead, you can optionally specify the TCP/IP port
      in the Upld_StartServer function as described below.
    
- "Upld_StartServer"
    - This function takes an optional "port" parameter which is the
        TCP/IP port for the server to listen for connections on.
        This is different because the "Upld-StartServer" function in
        the FileMaker 6 version of the plug-in does not take any
        parameters.
        
- "Upld_Export"
    - This function only exists in the FileMaker 7 version of the
        plug-in and only exists when you have the New Style
        Functions enabled. (They are enabled by default.) This
        function takes a container field as the first parameter, a
        file path as the second parameter, and a file name as the
        third parameter. The container field parameter is the
        container field in your database that you want to export to
        your hard drive. The file path parameter is the path to a
        folder on your hard drive where you want to export the file
        in the container field to. The file name parameter is the
        file name you want the exported file to have. (The name of
        the file is actually stored in the container field with the
        file, but for some reason retrieving that file name through
        the plug-in architecture seems to be broken. So, in the
        future this parameter will be optional, but for now you must
        specify it so that the plug-in knows what to name the
        exported file.) The plug-in will export the file in the
        container field to the file path and file name you specify.
        It will set the file extension appropriately for the kind
        of file the container field contains.
        
- "Upld_Import"
    - This function only exists in the FileMaker 7 version of the
        plug-in and only exists when you have the New Style
        Functions enabled. (They are enabled by default.) This
        function takes a single parameter which is the full path
        and file name of a file to import. When you use this
        function in a Set Field calculation, you must specify a
        container field to set so that it will import the file into
        the container field. At the moment, this function will only
        import JPEG and GIF images as images. Every other file you
        import with this function will show up simply as a file.
        Setting the file name of a file in a container field through
        the plug-in architecture also seems to be broken, so any
        file you import with this function will show up as
        "Untitled.dat" in the container field, but will be the file
        you imported. (In other words, if you right click on the
        container field and export the contents to a file, it will
        be the file that you imported, it just will not have the
        original file name.)
        
        
Installing the Example Solution:

In the FM7 Preview folder, you should find a folder named "Image
Import Example". Inside this folder you should find two databases
named "ImageImport_Startup.fp7" and "ImageImport_IWP.fp7", a file
named "UPLOADit_Realms.xml", and a subfolder named "ImageImport".
Copy the entire "ImageImport" folder into the "Web" folder inside
your FileMaker 7 application folder. Copy the "UPLOADit_Realms.xml"
file to the "Extensions" folder inside your FileMaker 7 application
folder (right next to the UPLOADit plug-in file).

Next, open FileMaker and turn on Instant Web Publishing. On Windows,
go to the "Edit" menu, select "Sharing", and then select "Instant
Web Publishing...". On Macintosh, go to the "FileMaker" menu, select
"Sharing", and then select "Instant Web Publishing...". You should
now be looking at the "Instant Web Publishing" dialog. Near the top
the dialog, you should see two radio buttons with the words "Off"
and "On". If Instant Web Publishing is not "On", then select that
radio button to turn it on. On Macintosh, it will probably prompt
you for your administrators password to allow Instant Web Publishing
to start on TCP/IP Port 80, so give it your administrators password
so it can start up. After Instant Web Publishing is turned on, press
the "OK" button to close the dialog.

Now, open up the "ImageImport_Startup.fp7" database from the "Image
Import Example" folder. Click on the "Continue" buttons until you
get to a layout with the "Start Server" and "Stop Server" buttons.
Press the "Start Server" button and the example solution should be
ready for testing. (The "ImageImport_IWP.fp7" file should open when
you press the "Start Server" button. This second database is the
database that is used in a web browser through Instant Web
Publishing.)


Testing the Example Solution:

After you install the example solution and start the UPLOADit server
as outlined in the "Installing the Example Solution" section above,
you are ready to test the example. So, open up an Instant Web
Publishing compatible browser (Internet Explorer on Windows, or
Internet Explorer or Safari on Macintosh), and go to:

http://127.0.0.1/

This should open the Instant Web Publishing web interface page in
your browser, and you should see the "ImageImport_IWP" database
listed. Click on the "ImageImport_IWP" link to open the database.
Click on the "Continue" button to get to the data entry layout.
Click on the "New Record" button in the top-left of the status area
and type in your First and Last Name into the fields. Then press the
"Upload Image" button under the container field. A new browser
window should appear (***) with instructions on it telling you to
choose an image file to upload. So, use the "Browse..." or "Choose a
File..." button to select a GIF or JPEG image from your hard drive
and then press the submit button. Your web browser should upload the
image to the UPLOADit server running on your machine and present you
with a "Thank you" page that has a "Back" button on it. Press the
"Back" button, and that browser window should disappear and your
Instant Web Publishing browser window should refresh to show you the
image you uploaded into the container field. That's all there is to
it!

*** - In our testing, it would appear that something in either
Safari 1.2.1 or OS X 10.3.3 has broken the "Open URL" script step in
Instant Web Publishing on the Mac. This example solution uses the
"Open URL" script step to open the web page that allows you to
select a file to upload when you press the "Upload Image" button.
Since this is broken in Safari 1.2.1 or OS X 10.3.3, it effectively
breaks this example solution if you use Safari to access Instant Web
Publishing on the Mac. You can, however, use Internet Explorer on
the Mac and it all mostly works, though sometimes the database
layouts are not drawn correctly when using that browser on the Mac.
If you are using Internet Explorer on Windows, you should not have
any problems using this example solution.


--------------------------------------------------------
Comm-Unity Networking Systems
<http://www.cnsplug-ins.com/>
